const Router = require('koa-router')

const router = new Router({ prefix: '/playlist' })

const { auth } = require('../middleware/auth_middleware')
const { colletVaild, colletidsVaild, ParamsVaild } = require('../middleware/userlist_middleware')
const { collectKeen, cancelCollect, musicCollect, musicSearchcollect } = require('../controller/userlist_controller')
//keen
//收藏歌单
router.post('/listcollect', auth, colletVaild, collectKeen)
//是否已收藏
router.post('/searchcollect', auth, musicSearchcollect)
//取消收藏
router.post('/cancelcollect', auth, colletidsVaild, cancelCollect)
//获取已收藏
router.get('/getfavoritelist', auth, ParamsVaild, musicCollect)

module.exports = router